package edu.zju.gis.dbfg.common.exception;

import edu.zju.gis.dbfg.common.base.BaseException;
import edu.zju.gis.dbfg.common.constant.CodeConstants;

import java.util.Arrays;

/**
 * @author Hu
 * @date 2019/9/4
 * 并行模型失败的Exception
 **/
public class ModelFailedException extends BaseException {
  public ModelFailedException(Class clz, String method, String msg, String... data){
    super(CodeConstants.MODEL_ERROR, String.format("模型运行失败：%s, %s, %s，%s", clz.getName(), method, Arrays.toString(data), msg));
  }

  public ModelFailedException(int code, Class clz, String method, String msg, String... data){
    super(code, String.format("模型运行失败：%s, %s, %s，%s", clz.getName(), method, Arrays.toString(data), msg));
  }
}
